import request from '@/utils/request';
import { ScoreQueryDTO } from '@/api/fill/execute/budget-total/Types';
import { ExeAssessScoresDTO } from '@/api/fill/execute/scores/Types';

/**
 * 考核得分汇总
 * @param query
 */
export const getList = (query: ScoreQueryDTO) => {
  return request({
    url: '/exe/assess-scores/list',
    method: 'post',
    data: query
  });
};

/**
 * 保存
 * @param query
 */
export const saveOrUpdate = (query: ExeAssessScoresDTO) => {
  return request({
    url: '/exe/assess-scores/saveOrUpdate',
    method: 'post',
    data: query
  });
};

/**
 * 详情
 * @param query
 */
export const getDetail = (query: ScoreQueryDTO) => {
  return request({
    url: '/exe/assess-scores/getInfo',
    method: 'post',
    data: query
  });
};

/**
 * 下达/归档（修改状态）
 * @param query
 */
export const updateStatus = (query: ScoreQueryDTO) => {
  return request({
    url: '/exe/assess-scores/updateStatus',
    method: 'post',
    data: query
  });
};

/**
 * 获得登录用户的预算部门
 * @param query
 */
export const getBudgetDept = (query: ScoreQueryDTO) => {
  return request({
    url: '/exe/assess-scores/getBudgetDept',
    method: 'post',
    data: query
  });
};

/**
 * 考核得分查询
 * @param query
 */
export const getMyList = (query: ScoreQueryDTO) => {
  return request({
    url: '/exe/assess-scores/getList',
    method: 'post',
    data: query
  });
};
